<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
	<f:layout name="Default" />

	This Template is responsible for creating a table of domain objects.

	If you modify this template, do not forget to change the overwrite settings
	in /Configuration/ExtensionBuilder/settings.yaml:
	  Resources:
		Private:
		  Templates:
			List.html: keep

	Otherwise your changes will be overwritten the next time you save the extension in the extension builder

	<f:section name="content">
	<link rel="stylesheet" type="text/css" href="{f:uri.resource(path:'Css/style.css')}">
		<div class="portlet light ">
	        <div class="portlet-title">
		        <div class="caption">
		            <f:link.action action="new"  arguments="{albumuid:albumuid}" class="btn btn-info">新增</f:link.action>
		        </div>
		        <div class="actions">
		            <div class="btn-group btn-group-devided">
		                <f:form action="list" name="search" class="form-inline" method="GET">
		                	<f:form.hidden name="album" value="{albumuid}"/>
		                    <div class="input-group">
		                        <div class="input-icon">
		                            <i class="fa fa-search"></i>
		                           <f:form.textfield name="keyword" value="{keyword}" class="form-control" placeholder="请输入查询条件"/>
		                        </div>
		                        <span class="input-group-btn">
		                            <f:form.submit class="btn btn-success" value="搜" />
		                        </span>
		                    </div>
		                </f:form>
		            </div>
		            <f:link.action action="list" pageUid="{settings.page}" controller="Album" class="btn btn-success">返回</f:link.action>
		        </div>
		    </div>
	            <div class="portlet-body">
		            <div class="table-scrollable">
			            <f:widget.paginate objects="{photos}" as="photosPagination"  configuration="{settings.paginate}">
			                <table class="table table-hover table-light">
			                    <thead>
			                        <tr role="row">
			                            <th>序号</th>
			                            <th>图片</th>
			                        	<th>标题</th>
			                        	<th width="35%">描述</th>
			                        	<th>上传时间</th>
			                            <th class="text-center">操作</th>
			                        </tr>
			                    </thead>
			                    <tbody>
			                        <f:for each="{photosPagination}" as="photo" iteration="itemIteration1">
			                        <tr>
			                        	<td>
			                            	{f:cObject(typoscriptObjectPath:'lib.calc', data:'{itemIteration1.cycle}+({page}-1)*{settings.paginate.itemsPerPage}')}
			                            </td>
			                            <td><f:image class="pimg" src="fileadmin{photo.identifier}" id="fileadmin{photo.identifier}" width="100c" height="80c"/></td>
			                            <td>{photo.title}</td>
			                            <td>{photo.description}</td>
			                            <f:if condition="{photo.crdate}==0">
			                            	<f:then><td></td></f:then>
			                            	<f:else><td>{photo.crdate -> f:format.date(format: 'Y-m-d H:i')}</td></f:else>
			                            </f:if>
			                            <td class="text-center">
			                            	<f:link.action action="show" arguments="{albumuid:albumuid,fuid:photo.fuid}" class="btn btn-info btn-xs edit">详情</f:link.action>
			                                <f:link.action action="edit" arguments="{albumuid:albumuid,fuid:photo.fuid,muid:photo.muid}" class="btn btn-info btn-xs edit">编辑</f:link.action>
			                                <f:link.action action="delete" arguments="{albumuid:albumuid,fuid:photo.fuid,muid:photo.muid}" onclick="return confirm('您确定要删除吗?');" class="btn btn-danger btn-xs delete btn-del">删除</f:link.action>
			                            </td>
			                        </tr>
			                        </f:for>
			                    </tbody>
			                </table>
			            </f:widget.paginate>
		            </div>
	          	</div>
	    </div>
	    <div id="outerdiv" style="position:fixed;top:0;left:0;background:rgba(0,0,0,0.2);z-index:2;width:100%;height:100%;display:none;">
			<div id="innerdiv" style="position:absolute;">
			    <img id="bigimg" style="border:5px solid #fff;" src="" />
			</div>
		</div>
		<script src="{f:uri.resource(path:'JavaScript/common.js')}" ></script>
		<f:flashMessages />
	</f:section>
</html>